<template>
	<div>
		<table class="owntable mb20 table1" border="0" cellspacing="0" cellpadding="1" style="width: 100%;" v-if="detail.guifanFileList && detail.guifanFileList.length!=0">
			<tr><td style="">规范性操作文件</td></tr>

			<tr v-for="(item, i) in detail.guifanFileList" :key="i">
				<td class="white_bg">
					<div class="flex_between">
						<span class="main_co pointer" @click="preContent(item, '4')">{{ item.name }}</span>
						<div class="gray_f">
							<!-- 2021-11-01 15:29 编辑 -->
							<!-- <el-button size="mini" v-if="detail.isSystemCover == '1'">封面预览</el-button> -->
              <el-button size="mini" @click="pre(item)" v-if="item.templateCover">封面预览</el-button>
							<!-- <el-checkbox class="ml10" v-model="check"></el-checkbox> -->
						</div>
					</div>
				</td>
			</tr>
		</table>
		<table class="owntable mb20 table1" border="0" cellspacing="0" cellpadding="1" style="width: 100%;">
			<tr>
				<td style="width: 150px;">记录保留期限</td>
				<td class="white_bg">{{ detail.retentionPeriod }}年</td>
			</tr>
		</table>
		<table class="owntable mb20" border="0" cellspacing="0" cellpadding="1" style="width: 100%;">
			<tr>
				<td>记录</td>
				<td class="gray_bg" width="200">记录流水编号</td>
			</tr>
		  <tr v-for="(item, i) in detail.jiluFileList" :key="i">
		  	<td class="white_bg">
		  		<div class="flex_between">
		  			<span class="main_co pointer" @click="preContent(item,2)">{{ item.name }}</span>
		  			<div>
		  				<el-button size="mini" @click="pre(item)" v-if="item.isSystemCover==1">封面预览</el-button>
		  				<!-- <el-checkbox class="ml10" v-model="check"></el-checkbox> -->
		  			</div>
		  		</div>
		  	</td>
		  	<td width="200">{{ item.serialNumber }}</td>
		  </tr>
		</table>

     <pdf :pdfUrl="src" ref="pdf"></pdf>
	</div>
</template>

<script>
  import pdf from '../pdf/index.vue'
  export default {
    components:{
      pdf
    },
    props:{
      detail:{
        type:Object,
        default(){
          return{}
        }
      }
    },
    data() {
      return {
        src: ''
      };
    },
    methods:{
      pre(item) {
        if(item.templateCover){
          this.src=item.templateCover;
          this.$refs.pdf.open();
        }
      }
    }
  }
</script>

<style>
</style>
